.class Lcom/waiqin365/lightapp/im/activity/dh;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/activity/dh;->a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/dh;->a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;->f(Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;)Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/waiqin365/base/db/imnotice/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/imnotice/f;

    move-result-object v0

    sget-object v1, Lcom/waiqin365/lightapp/im/a;->h:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/imnotice/f;->f(Ljava/lang/String;)Ljava/util/List;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/dh;->a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    invoke-static {v1, v0}, Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;->a(Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;I)I

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/dh;->a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;->c(Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/dh;->a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;->d(Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;)Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/dailyreport/view/CustomListview;->getFirstVisiblePosition()I

    move-result v1

    sub-int/2addr v0, v1

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/dh;->a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;->i(Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;)I

    move-result v1

    if-ge v0, v1, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/dh;->a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;->f(Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;)Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/waiqin365/base/db/imnotice/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/imnotice/f;

    move-result-object v0

    sget-object v1, Lcom/waiqin365/lightapp/im/a;->h:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/imnotice/f;->e(Ljava/lang/String;)Lcom/waiqin365/base/db/imnotice/g;

    move-result-object v0

    if-eqz v0, :cond_1

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/dh;->a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/imnotice/g;->a()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;->a(Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;Ljava/lang/String;)Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/dh;->a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/dh;->a:Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;->i(Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;)I

    move-result v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;->b(Lcom/waiqin365/lightapp/im/activity/XiaomishuActivity;I)V

    :cond_1
    invoke-static {}, Lcom/waiqin365/lightapp/im/utils/f;->a()Ljava/util/Observable;

    move-result-object v0

    const-string/jumbo v1, "updateXMSMessageReadStatus"

    invoke-virtual {v0, v1}, Ljava/util/Observable;->notifyObservers(Ljava/lang/Object;)V

    return-void
.end method
